#ifndef ORIENTED_SEGMENT_HPP
#define ORIENTED_SEGMENT_HPP

#include "Line.hpp"
#include <allegro.h>

/*
 * OrientedSegment is defined by a point where it begins, a direction (angle in radians) and a
 * length.
 */

class OrientedSegment : public Line {
    public:
        OrientedSegment() { x = y = angle = length = 0; };
        OrientedSegment(int newx, int newy, int newangle, int newlen) { x = newx; y = newy; angle = newangle; length = newlen; };
        int getLength() { return length; };
        int getOtherEndX();
        int getOtherEndY();
        void draw(BITMAP* screen, int color);
        void setLength(int newlen) { length = newlen; };
    protected:
        int length;
};

#endif
